package com.example.mybatisplus.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mybatisplus.mapper.AdjustDormitoryMapper;
import com.example.mybatisplus.mapper.RoomMapper;
import com.example.mybatisplus.model.domain.Dot;
import com.example.mybatisplus.model.domain.Room;
import com.example.mybatisplus.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zzy
 * @since 2024-06-24
 */
@Service
public class RoomServiceImpl extends ServiceImpl<RoomMapper, Room> implements RoomService {
    @Autowired
    private RoomMapper roomMapper;
    @Autowired
    private AdjustDormitoryMapper adjustDormitoryMapper;

    @Override
    public List<Map<String, Object>> searchRoomByAreaNameAndBuildingNameAndRoomName(Dot dot) {

        List<Map<String, Object>> res = roomMapper.searchRoomByAreaNameAndBuildingNameAndRoomName(dot);
        return res;
    }

    @Override
    public List<Room> selectRoomByBuildingID(Long buildingID) {

        return roomMapper.selectRoomByBuildingID(buildingID);
    }



}
